package com.yy.permissions_general.common.constant;

/**
* @Description: 返回状态枚举
* @Author: YY
* @Date: 2021/3/14
*/
public enum StatusEnum {

    /*成功*/
    OK(200,"请求处理成功~"),

    /*参数异常*/
    PARAMETER_EXCEPTION(400, "参数异常~"),

    /*演示环境异常*/
    PREVIEW_EXCEPTION(500, "演示环境下不能操作~"),

    /*layUI 数据表格默认成功状态码*/
    SUCCESS(0,"请求处理成功~"),

    /*清除缓存成功*/
    CLEAR_CACHE(1,"清除缓存成功~"),

    /*失败*/
    FAIL(-1,"请求处理失败~"),

    /*服务器异常*/
    INTERNAL_SERVER_ERROR(500,"服务器内部错误~"),

    /*重复添加*/
    REPEAT_ADD_ERROR(-1,"重复添加~"),

    /*暂无权限*/
    NO_PERMISSION_ERROR(403,"暂无权限~");

    /**
     * 状态码
     */
    public Integer code;

    /**
     * 提示信息
     */
    public String msg;

    StatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return msg;
    }
}
